package org.luxor.commons.elasticsearch.metadata;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @author Mr.Yan  @date 2019/9/26$
 */
@ApiModel(description = "排序项")
public class EsOrderItem implements Serializable {

    @ApiModelProperty(value = "排序的列", example = "id")
    private String column;

    @ApiModelProperty(value = "是否正序排列", example = "true")
    private boolean asc = true;

    public EsOrderItem() {
    }

    public EsOrderItem(String column, boolean asc) {
        this.column = column;
        this.asc = asc;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public boolean getAsc() {
        return asc;
    }

    public void setAsc(boolean asc) {
        this.asc = asc;
    }

    @Override
    public String toString() {
        return "EsOrderItem{" +
                "column='" + column + '\'' +
                ", asc=" + asc +
                '}';
    }
}
